
function  Parent(name, actions) {
  this.name = name
  this.actions = actions
}

Parent.prototype.eat = function(){
  console.log(this.name)
}
Parent.prototype.getName = function(){
  console.log(this.name)
}

function Child(id,...args) {
  Parent.apply(this,args)
  this.id = id
}

Child.prototype = new Parent()
Child.prototype.constuctor = Child


const child1 = new Child(1,'lulu',['1111'])
const child2 = new Child(2,'xiaoming',['4444','555'])

child1.actions.push('333')
console.log(child1.actions)
console.log(child2.actions)
console.log(child1.eat === child2.eat) // true

child1.getName()
child2.getName()